home *** CD-ROM | disk | FTP | other *** search
- Path: Hermes.grace.irl.cri.nz!maths!peterm
- From: peterm@maths.grace.cri.nz (Peter McGavin)
- Newsgroups: comp.sys.amiga.programmer
- Subject: Re: Demo/game to OS frien
- Date: 29 Jan 1996 23:51:47 GMT
- Organization: Industrial Research Ltd
- Message-ID: <PETERM.96Jan30125147@tui.maths.irl.cri.nz>
- References: <4dtbl0$84n@sinsen.sn.no> <4dtgil$1kn@serpens.rhein.de>
- <4e382s$54t$1@sydney.DIALix.oz.au> <4e3imr$is@serpens.rhein.de>
- <jdm.822861553@thetics>
- NNTP-Posting-Host: tui.grace.cri.nz
- In-reply-to: jdm@atheria.europa.com's message of 28 Jan 1996 12:58:20 -0800
-
- jdm@atheria.europa.com (Jesse) writes:
- >What if you use the OS (ooo!) to shut it down and use your
- >own preemptive multitasking kernel (which has lower overhead and is more suited
- >for the task than exec), restoring the system when your program is finished?
-
- It is dangerous to restore the OS except by rebooting. In particular,
- third-party DMA devices are likely to be screwed. There is a risk of
- corrupting hard disks. It plays havoc with networks.
-
- Also, taking over the OS interrupt subsystem conflicts with the design
- goals of the multitasking executive. Interrupt handlers and servers
- must be installed with SetIntVector(), AddIntServer(), QBlit(),
- AddICRVector(), etc (unless we reboot afterwards). Interrupts may not
- be disabled for more than 250 microseconds (unless we reboot
- afterwards).
-
- On the other hand, the OS allows hardware-banging. Hardware must be
- exclusively allocated through the OS first. Custom gfx chips may be
- exclusively allocated with LoadView(NULL); audio registers with
- audio.device; parallel port with misc.resource; and so on.
-
- By installing an input handler, leaving multitasking on, adjusting
- priorities and allocating hardware as required, almost any OS-killing
- program can be made OS-compliant with practically no performance loss.
- This method has all the performance advantages of killing the OS and
- it allows network play, continuous async HD/CDROM caching, OS library
- calls, etc. However it doesn't work with unknown gfx-cards,
- audio-cards, third-party parallel ports, new Amigas, etc, unless the
- program includes an option for entirely high-level OS calls. A
- program can be selective about which hardware it bangs.
- --
- Peter McGavin. (p.mcgavin@irl.cri.nz)
-